The machine tool is provided with a tool holding mechanism for holding a tool, a workpiece holding mechanism for holding a workpiece, a drive mechanism for operating one or both of the holding mechanisms, and a control device for controlling the operation of the drive mechanism. The control device controls the drive mechanism on the basis of an NC program.
The NC program is created by an operator using a manual program creating device or an automatic programming device, and before continuous machining is performed using the created NC program, it is verified whether the NC program has an error.
The NC program verification is performed by an operator, for example, watching a displayed image of a tool and workpiece which move in accordance with the NC program and checking the moving state of the tool and the machining state. As an apparatus which is used for such verification, for example, an NC machining simulation apparatus disclosed in Japanese Unexamined Patent Application Publication No. 2006-85485 is known.
This NC machining simulation apparatus is provided with: a main control section; a display device; a machining program memory for storing a NC program; a model memory for storing data of three-dimensional models of a tool, workpiece, tool rest for holding the tool, chuck for holding the workpiece, and spindle on which the chuck is mounted; a program-analysis-processing control section for analyzing the NC program stored in the machining program memory; a simulation control section for calculating a moving path of the tool on the basis of the program analysis performed by the program-analysis-processing control section; a model-processing control section for calculating model data of the tool, workpiece, tool rest, chuck and spindle which are moved relative to one another along the moving path of the tool on the basis of the result of the calculation performed by the simulation control section and the model data in the model memory; a model-plotting-processing control section for generating image data on the basis of the model data calculated by the model-processing control section and other components. The image data generated by the model-plotting-processing control section is displayed on the display device under the display control of the main control section.